ci: trigger cargo publish from release workflow - #103
Merged
Conversation
GITHUB_TOKEN-created releases don't fire on:release triggers, so dispatch cargo-publish.yml directly from release.yml (same pattern as GHCR image publish). Signed-off-by: danbugs <danilochiarlone@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the release automation so the crates.io publish workflow is triggered directly from the release workflow, avoiding reliance on on: release (which doesn’t fire for releases created via GITHUB_TOKEN).
Changes:
- Dispatch
cargo-publish.ymlfromrelease.ymlat the end of the release job. - Remove the
on: releasetrigger fromcargo-publish.yml, leaving itworkflow_dispatch-only.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/release.yml | Adds a step to trigger the crates.io publish workflow via gh workflow run on the release tag ref. |
| .github/workflows/cargo-publish.yml | Removes the release event trigger so publishing is driven by explicit workflow dispatch. |
Comments suppressed due to low confidence (1)
.github/workflows/cargo-publish.yml:10
- With the
on: releasetrigger removed, this workflow can no longer run in areleaseevent context, but later steps still branch on${{ github.event_name }} == "release"to forcedry_run=false. That conditional is now unreachable and can mislead future changes; consider simplifying the workflow to always derivedry_runfrominputs.dry_run(and rely on the caller—release.yml—to passdry_run=falsewhen publishing).
on:
workflow_dispatch:
inputs:
dry_run:
description: "Run without actually publishing"
type: boolean
default: true
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Linux Benchmarks
Details
| Benchmark suite | Current: 1ee87eb | Previous: 682ad20 | Ratio |
|---|---|---|---|
hello_world (median) |
20 ms |
20 ms |
1 |
pandas (median) |
110 ms |
120 ms |
0.92 |
density (per VM) |
8 MB |
8 MB |
1 |
snapshot (disk) |
653 MiB |
653 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
Contributor
There was a problem hiding this comment.
Windows Benchmarks
Details
| Benchmark suite | Current: 1ee87eb | Previous: 682ad20 | Ratio |
|---|---|---|---|
hello_world (median) |
315 ms |
291 ms |
1.08 |
pandas (median) |
977 ms |
1024 ms |
0.95 |
density (per VM) |
7 MB |
7 MB |
1 |
snapshot (disk) |
661 MiB |
661 MiB |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo-publish.ymldispatch torelease.yml(same pattern as GHCR image publish)on: releasetrigger fromcargo-publish.yml— releases created byGITHUB_TOKENdon't fireon: releaseeventsTest plan
workflow_dispatchto publish to crates.io